/**
 * 
 */
package com.dashboard.dao;

import java.util.List;

import javax.persistence.Query;

import org.springframework.stereotype.Repository;

import com.dashboard.domain.Movie;

/**
 * @author Joao
 * 
 */
@Repository
public class MovieDaoWithJpa extends GenericoDaoImpl<Movie, Long> implements
	MovieDao 
{
	/**
	 * @param title sdsd
	 * @return List sdfsd
	 */
	@SuppressWarnings("unchecked")
	public List findByTitle(String title) 
	{
		Query query = entityManager.createQuery("Select m from Movie m where m.title = ?1");
		query.setParameter(1, title);

		return query.getResultList();
	}

}